package com.bootdo.lvyou_specialty.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.lvyou_specialty.dao.LvyouSpecialtyOrderPartDao;
import com.bootdo.lvyou_specialty.domain.LvyouSpecialtyOrderPart;
import com.bootdo.lvyou_specialty.service.LvyouSpecialtyOrderPartService;



@Service
public class LvyouSpecialtyOrderPartServiceImpl implements LvyouSpecialtyOrderPartService {
	@Autowired
	private LvyouSpecialtyOrderPartDao lvyouSpecialtyOrderPartDao;
	
	@Override
	public LvyouSpecialtyOrderPart get(Long id){
		return lvyouSpecialtyOrderPartDao.get(id);
	}
	
	@Override
	public List<LvyouSpecialtyOrderPart> list(Map<String, Object> map){
		return lvyouSpecialtyOrderPartDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return lvyouSpecialtyOrderPartDao.count(map);
	}
	
	@Override
	public int save(LvyouSpecialtyOrderPart lvyouSpecialtyOrderPart){
	
		if(lvyouSpecialtyOrderPart.getId() != null) {
			return lvyouSpecialtyOrderPartDao.update(lvyouSpecialtyOrderPart);
		}else {
			return lvyouSpecialtyOrderPartDao.save(lvyouSpecialtyOrderPart);
		}		
	
		
	}
	
	@Override
	public int update(LvyouSpecialtyOrderPart lvyouSpecialtyOrderPart){
		return lvyouSpecialtyOrderPartDao.update(lvyouSpecialtyOrderPart);
	}
	
	@Override
	public int remove(Long id){
		return lvyouSpecialtyOrderPartDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return lvyouSpecialtyOrderPartDao.batchRemove(ids);
	}
	
}
